Skip to content

fix(attachments): Store the attachment file name in objectstore - #6276

Draft
jan-auer wants to merge 2 commits into
masterfrom
fix/attachment-filename-metadata
Draft

fix(attachments): Store the attachment file name in objectstore#6276
jan-auer wants to merge 2 commits into
masterfrom
fix/attachment-filename-metadata

Conversation

@jan-auer

@jan-auer jan-auer commented Jul 31, 2026

Copy link
Copy Markdown
Member

Objectstore only sends Content-Disposition for objects that were stored with filename metadata. Relay never set it, so after getsentry/sentry#120958 started redirecting attachment downloads to Objectstore, downloads were named after the storage key instead of the attachment.

Bumps objectstore-client to 0.2.0, which adds PutBuilder::filename, and passes the attachment item's file name for both event attachments and standalone (individual) attachments. The name is forwarded verbatim; escaping for the Content-Disposition header is Objectstore's concern, not the caller's. Only newly stored objects are affected.

Attachments uploaded through the chunked upload endpoint (attachment_ref) still have no file name: the TUS Upload-Metadata header carries one, but Relay only parses its sentry key and the object is already stored by the time the envelope arrives. Left as follow-up.

Refs FS-466
See getsentry/sentry#120958

@linear-code

linear-code Bot commented Jul 31, 2026

Copy link
Copy Markdown

FS-466

@jan-auer
jan-auer marked this pull request as ready for review July 31, 2026 09:37
@jan-auer
jan-auer requested a review from a team as a code owner July 31, 2026 09:37
@jan-auer
jan-auer requested a review from lcian July 31, 2026 09:37
#[cfg(debug_assertions)]
let original_key = key.clone();

let attributes = ObjectAttributes {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't these have a filename we could use?

@jan-auer

jan-auer commented Jul 31, 2026

Copy link
Copy Markdown
Member Author

Put on hold. Permissible unicode characters in filenames are sent verbatim to objectstore server, where they will fail during metadata construction. This must be fixed on the server-side first (Filed as FS-467)

@jan-auer
jan-auer marked this pull request as draft July 31, 2026 10:54
@jan-auer

Copy link
Copy Markdown
Member Author

Ready to merge after getsentry/objectstore#581

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants